/**
  *@File文件:HelpFeedbackService.java
  *@Date日期:2017年7月14日 下午4:14:41
  *@Copyright版权:Corporation 2017
  */
package com.qiaomengapp.serviceImp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qiaomengapp.bean.HelpFeedback;
import com.qiaomengapp.dao.HelpFeedbackMapper;
import com.qiaomengapp.exception.CustomException;
import com.qiaomengapp.service.IHelpFeedbackService;

/**
 *@Description描述: 帮助与反馈
 *@Author作者 jinxin
 *@Date日期:2017年7月14日
 */
@Service
public class ImpHelpFeedbackService implements IHelpFeedbackService{
	@Autowired
	private HelpFeedbackMapper helpFeedbackMapper;
	//填写反馈和帮助
	public int insert_helpFeedback(HelpFeedback helpFeedback) throws CustomException{
		int i = helpFeedbackMapper.insert_helpFeedback(helpFeedback);
		if(i==0){
			throw new CustomException("填写失败");
		}
		return i;
		
	}
		
	//查看反馈和帮助
	public List<HelpFeedback> select_helpFeedback() throws CustomException{
		List<HelpFeedback> list = helpFeedbackMapper.select_helpFeedback();
		if(list==null||list.size()==0){
			throw new CustomException("没有反馈和帮助的信息");
		}
		return list;
		
	}
}
